home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Aug 28, 1998
- //
- // Author: bkwok
- //
- // Description:
- // This implements the "Edit Polygons" menu on the modeling menubar.
- //
-
- global proc string editPolygonsMenuItemToShelf (string $item)
- {
- return $item;
- }
-
- // Description: Determines the poly prelight procedure associated with the
- // current renderer and executes it
- // Returns: None
- //
- global proc callRendererSpecificPolyPrelight(int $arg)
- {
- $command = eval("renderer -query -polyPrelightProcedure (currentRenderer())");
- if ($command != "")
- {
- eval $command $arg;
- }
- else
- {
- string $currentRendererName = currentRenderer();
- string $renUIName = `renderer -query -rendererUIName $currentRendererName`;
- error -showLineNumber true
- ("Current Renderer " + $renUIName
- + " does not support polygon prelight");
- }
-
- }
-
-
- proc PolyClipboardMenu( string $parent )
- //
- // Description:
- // Polygon clipboard action menu
- //
- {
- setParent -menu $parent;
-
- menuItem
- -label "Copy"
- -annotation (getRunTimeCommandAnnotation("PolygonCopy"))
- -command "PolygonCopy"
- -dragMenuCommand "performPolyCopyPaste 2 1"
- -dragDoubleClickCommand "PolygonCopyOptions"
- ;
-
- menuItem -optionBox true
- -imageOverlayLabel "CPOB"
- -annotation (getRunTimeCommandAnnotation("PolygonCopyOptions"))
- -command "PolygonCopyOptions"
- ;
-
- menuItem -label "Paste"
- -annotation (getRunTimeCommandAnnotation("PolygonPaste"))
- -command "PolygonPaste"
- -dragMenuCommand "performPolyCopyPaste 2 2"
- -dragDoubleClickCommand "PolygonPasteOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("PolygonPasteOptions"))
- -command "PolygonPasteOptions"
- ;
-
- menuItem -label "Clear Clipboard"
- -annotation (getRunTimeCommandAnnotation("PolygonClearClipboard"))
- -command "PolygonClearClipboard"
- -dragMenuCommand "performPolyCopyPaste 2 3"
- -dragDoubleClickCommand "PolygonClearClipboardOptions"
- ;
-
- menuItem -optionBox true
- -imageOverlayLabel "CLOB"
- -annotation (getRunTimeCommandAnnotation("PolygonClearClipboardOptions"))
- -command "PolygonClearClipboardOptions"
- ;
- }
-
- proc PolyColorsMenu( string $parent )
- //
- // Description:
- // Polygon color editing menu
- //
- {
- setParent -menu $parent;
-
- menuItem -checkBox false
- -label "Convert Display"
- -annotation "Convert Display: Switch to Show Colors in Shaded mode when appropriate"
- -enableCommandRepeat false
- -command "toggleAutoShowColorPerVertex"
- toggleAutoShowColorPerVertexItem;
-
- menuItem -divider true;
-
- menuItem
- -label "Apply Color"
- -annotation (getRunTimeCommandAnnotation("PolygonApplyColor"))
- -image "polyApplyColor.xpm"
- -command "PolygonApplyColor"
- -dragMenuCommand "performApplyColor 2"
- -dragDoubleClickCommand "PolygonApplyColorOptions"
- ;
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("PolygonApplyColorOptions"))
- -image "polyApplyColor.xpm"
- -command "PolygonApplyColorOptions"
- ;
-
- menuItem
- -label "Prelight (Maya Software)"
- -annotation ("Prelight polygon using the Maya software renderer")
- -command ("performPrelight " + 0)
- -dragMenuCommand ("performPrelight " + 2)
- -dragDoubleClickCommand ("performPrelight " + 1)
- ;
- menuItem -optionBox true
- -annotation ("Option box for prelighting polygon using the Maya software renderer")
- -command ("performPrelight " + 1)
- ;
-
- menuItem
- -label "Prelight (mental ray)"
- -annotation ("Prelight polygon using mental ray")
- -command ("mrBakeToVertices " + 0)
- -dragMenuCommand ("mrBakeToVertices " + 2)
- -dragDoubleClickCommand ("mrBakeToVertices " + 1)
- mentalPrelightItem
- ;
- menuItem -optionBox true
- -annotation ("Option box for prelighting polygon using mental ray")
- -command ("mrBakeToVertices " + 1)
- mentalPrelightOptionsItem
- ;
-
- menuItem
- -label "Set Vertex Color Key"
- -annotation "Set Vertex Color Key: Set a keyframe for colors on selected polygon components"
- -command "setPolyColorKeyframe"
- ;
-
- menuItem
- -label "Paint Vertex Color Tool"
- -annotation (getRunTimeCommandAnnotation("PaintVertexColorTool"))
- -image "paintVertexColour.xpm"
- -command "PaintVertexColorTool"
- -dragDoubleClickCommand "PaintVertexColorToolOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("PaintVertexColorToolOptions"))
- -image "paintVertexColour.xpm"
- -command "PaintVertexColorToolOptions"
- ;
-
- menuItem -edit -checkBox `optionVar -query polyAutoShowColorPerVertex`
- toggleAutoShowColorPerVertexItem;
- }
-
- global proc refreshPolyColorsMenu( string $parent )
- //
- // Description:
- // Refresh Polygon color editing menu
- //
- {
- int $mentalIsLoaded = 0;
-
- string $renderer;
- for ($renderer in `renderer -query -namesOfAvailableRenderers`)
- {
- if( $renderer == "mentalRay" )
- {
- $mentalIsLoaded = 1;
- break;
- }
- }
-
- menuItem -edit -enable $mentalIsLoaded mentalPrelightItem;
- menuItem -edit -enable $mentalIsLoaded mentalPrelightOptionsItem;
- }
-
- //////////////////////////////////////////////////////////////////////
-
- proc PolySelectMenu( string $parent )
- //
- // Description:
- // Polygon selection options menu
- //
- {
- setParent -menu $parent;
-
- menuItem
- -label "Grow Selection Region"
- -annotation (getRunTimeCommandAnnotation("GrowPolygonSelectionRegion"))
- -command "GrowPolygonSelectionRegion"
- -dragMenuCommand "editPolygonsMenuItemToShelf \"polySelectConstraint -pp 1\""
- ;
-
- menuItem
- -label "Shrink Selection Region"
- -annotation (getRunTimeCommandAnnotation("ShrinkPolygonSelectionRegion"))
- -command "ShrinkPolygonSelectionRegion"
- -dragMenuCommand "editPolygonsMenuItemToShelf \"polySelectConstraint -pp 2\""
- ;
-
- menuItem
- -label "Select Selection Boundary"
- -annotation (getRunTimeCommandAnnotation("SelectPolygonSelectionBoundary"))
- -command "SelectPolygonSelectionBoundary"
- -dragMenuCommand "editPolygonsMenuItemToShelf \"polySelectConstraint -pp 3\""
- ;
-
- menuItem
- -label "Select Contiguous Edges"
- -annotation (getRunTimeCommandAnnotation("SelectContiguousEdges"))
- -image "polyLoopEdge.xpm"
- -command "SelectContiguousEdges"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("SelectContiguousEdgesOptions"))
- -image "polyLoopEdge.xpm"
- -command "SelectContiguousEdgesOptions"
- ;
-
- menuItem -divider true;
-
- menuItem
- -label "Convert Selection to Faces"
- -annotation (getRunTimeCommandAnnotation("ConvertSelectionToFaces"))
- -image "polyConvertToFace.xpm"
- -command "ConvertSelectionToFaces"
- ;
-
- menuItem
- -label "Convert Selection to Edges"
- -annotation (getRunTimeCommandAnnotation("ConvertSelectionToEdges"))
- -image "polyConvertToEdge.xpm"
- -command "ConvertSelectionToEdges"
- ;
-
- menuItem
- -label "Convert Selection to Vertices"
- -annotation (getRunTimeCommandAnnotation("ConvertSelectionToVertices"))
- -image "polyConvertToVertices.xpm"
- -command "ConvertSelectionToVertices"
- ;
-
- menuItem
- -label "Convert Selection to UVs"
- -annotation (getRunTimeCommandAnnotation("ConvertSelectionToUVs"))
- -image "polyConvertToUVs.xpm"
- -command "ConvertSelectionToUVs"
- ;
-
- menuItem
- -label "Convert Selection to Vertex Faces"
- -annotation (getRunTimeCommandAnnotation("ConvertSelectionToVertexFaces"))
- -command "ConvertSelectionToVertexFaces"
- ;
-
- menuItem -divider true;
-
- menuItem -label "Selection Constraints..."
- -annotation (getRunTimeCommandAnnotation("PolygonSelectionConstraints"))
- -command "PolygonSelectionConstraints"
- ;
-
- }
-
- //////////////////////////////////////////////////////////////////////
-
- proc PolyNormalsMenu( string $parent )
- //
- // Description:
- // Polygon normal editing menu
- //
- {
- setParent -menu $parent;
-
- menuItem
- -label "Set Vertex Normal"
- -annotation (getRunTimeCommandAnnotation("SetVertexNormal"))
- -command "SetVertexNormal"
- -dragMenuCommand "performPolySetNormal 2"
- -dragDoubleClickCommand "SetVertexNormalOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("SetVertexNormalOptions"))
- -command "SetVertexNormalOptions"
- ;
-
- menuItem
- -label "Average Normals"
- -annotation (getRunTimeCommandAnnotation("AveragePolygonNormals"))
- -image "polyNormalAverage.xpm"
- -command "AveragePolygonNormals"
- -dragMenuCommand "performPolyAverageNormal 2"
- -dragDoubleClickCommand "AveragePolygonNormalsOptions"
- ;
-
- menuItem -optionBox true
- -image "polyNormalAverage.xpm"
- -annotation (getRunTimeCommandAnnotation("AveragePolygonNormalsOptions"))
- -command "AveragePolygonNormalsOptions"
- ;
-
- menuItem
- -label "Set to Face"
- -annotation (getRunTimeCommandAnnotation("SetToFaceNormals"))
- -image "polyNormalSetToFace.xpm"
- -command "SetToFaceNormals"
- -dragMenuCommand "performPolySetToFaceNormal 2"
- -dragDoubleClickCommand "SetToFaceNormalsOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("SetToFaceNormalsOptions"))
- -image "polyNormalSetToFace.xpm"
- -command "SetToFaceNormalsOptions"
- ;
-
- menuItem
- -label "Reverse"
- -annotation (getRunTimeCommandAnnotation("ReversePolygonNormals"))
- -image "polyNormal.xpm"
- -command "ReversePolygonNormals"
- -dragDoubleClickCommand "ReversePolygonNormalsOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("ReversePolygonNormalsOptions"))
- -image "polyNormal.xpm"
- -command "ReversePolygonNormalsOptions"
- ;
-
- menuItem
- -label "Conform"
- -annotation (getRunTimeCommandAnnotation("ConformPolygonNormals"))
- -image "polyNormalsConform.xpm"
- -command "ConformPolygonNormals"
- ;
-
- menuItem
- -label "Soften/Harden"
- -annotation (getRunTimeCommandAnnotation("PolygonSoftenHarden"))
- -image "polySoftEdge.xpm"
- -command "PolygonSoftenHarden"
- -dragMenuCommand "performPolySoftEdge 2"
- -dragDoubleClickCommand "PolygonSoftenHardenOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("PolygonSoftenHardenOptions"))
- -image "polySoftEdge.xpm"
- -command "PolygonSoftenHardenOptions"
- ;
- }
-
- //////////////////////////////////////////////////////////////////////
-
-
- global proc EditPolygonsMenu(string $parent)
- //
- // Description:
- // Polygon edit menu
- //
- {
- if (!`isTrue "PolygonsExists"`) return;
-
- setParent -menu $parent;
-
- if( `menu -query -numberOfItems $parent` != 0 ) {
- // Just edit the label ...
- string $cutFacesLabel, $cutFacesOptions, $cutFacesAnnotation;
- if( !`optionVar -exists polyPlaneCutDirection` ||
- (5 == `optionVar -q polyPlaneCutDirection` ) ) {
- $cutFacesLabel = "Cut Faces Tool";
- $cutFacesOptions = "Cut Faces Tool Options";
- $cutFacesAnnotation = "Cut Faces Tool: Cut the faces using a plane";
- } else {
- $cutFacesLabel = "Cut Faces";
- $cutFacesOptions = "Cut Faces Options";
- $cutFacesAnnotation = "Cut Faces: Cut the faces using a plane";
- }
-
- menuItem -edit
- -label $cutFacesLabel
- -annotation $cutFacesAnnotation
- EditPolygonCutPolygonItem;
-
- menuItem -edit
- -annotation $cutFacesOptions
- EditPolygonCutPolygonOptionsItem;
-
- return;
-
- } else {
-
- // Texture
- string $textItem=`menuItem -label "Texture"
- -subMenu true -tearOff true
- -allowOptionBoxes true polyTexturesItem`;
- PolyTextureMenu $textItem 0 "ls -sl";
- setParent -menu ..;
- menuItem -divider true;
-
- //////////////////////////////////////////////////////////////////////
- menuItem
- -label "Subdivide"
- -annotation (getRunTimeCommandAnnotation("SubdividePolygon"))
- -image "polySubdFacet.xpm"
- -command "SubdividePolygon"
- -dragMenuCommand "performPolySubdivide \"\" 2"
- -dragDoubleClickCommand "SubdividePolygonOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("SubdividePolygonOptions"))
- -image "polySubdFacet.xpm"
- -command "SubdividePolygonOptions"
- ;
-
- menuItem
- -label "Split Polygon Tool"
- -annotation (getRunTimeCommandAnnotation("SplitPolygonTool"))
- -image "polySplitFacet.xpm"
- -command "SplitPolygonTool"
- -dragDoubleClickCommand "SplitPolygonToolOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("SplitPolygonToolOptions"))
- -image "polySplitFacet.xpm"
- -command "SplitPolygonToolOptions"
- ;
-
- //////////////////////////////////////////////////////////////////////
- menuItem -divider true;
-
- menuItem
- -label "Extrude Face"
- -annotation (getRunTimeCommandAnnotation("ExtrudeFace"))
- -image "polyExtrudeFacet.xpm"
- -command "ExtrudeFace"
- -dragMenuCommand "performPolyChipOff 2 2"
- -dragDoubleClickCommand "ExtrudeFaceOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("ExtrudeFaceOptions"))
- -image "polyExtrudeFacet.xpm"
- -command "ExtrudeFaceOptions"
- ;
-
- menuItem
- -label "Extrude Edge"
- -annotation (getRunTimeCommandAnnotation("ExtrudeEdge"))
- -image "polyExtrudeEdge.xpm"
- -command "ExtrudeEdge"
- -dragMenuCommand "performPolyChipOff 2 4"
- -dragDoubleClickCommand "ExtrudeEdgeOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("ExtrudeEdgeOptions"))
- -image "polyExtrudeEdge.xpm"
- -command "ExtrudeEdgeOptions"
- ;
-
- menuItem
- -label "Extrude Vertex"
- -annotation (getRunTimeCommandAnnotation("ExtrudeVertex"))
- -image "polyExtrudeVertex.xpm"
- -command "ExtrudeVertex"
- -dragMenuCommand "performPolyExtrudeVertex 2"
- -dragDoubleClickCommand "ExtrudeVertexOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("ExtrudeVertexOptions"))
- -image "polyExtrudeVertex.xpm"
- -command "ExtrudeVertexOptions"
- ;
-
- menuItem -divider true;
-
- //////////////////////////////////////////////////////////////////////
- menuItem
- -label "Chamfer Vertex"
- -annotation (getRunTimeCommandAnnotation("ChamferVertex"))
- -image "polyChamfer.xpm"
- -command "ChamferVertex"
- -dragMenuCommand "performPolyChamferVertex 2"
- -dragDoubleClickCommand "ChamferVertexOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("ChamferVertexOptions"))
- -image "polyChamfer.xpm"
- -command "ChamferVertexOptions"
- ;
-
- menuItem
- -label "Bevel"
- -annotation (getRunTimeCommandAnnotation("BevelPolygon"))
- -image "polyBevel.xpm"
- -command "BevelPolygon"
- -dragMenuCommand "performPolyBevel 2"
- -dragDoubleClickCommand "BevelPolygonOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("BevelPolygonOptions"))
- -image "polyBevel.xpm"
- -command "BevelPolygonOptions"
- ;
-
- //////////////////////////////////////////////////////////////////////
- menuItem -divider true;
-
- string $cutFacesLabel, $cutFacesOptions, $cutFacesAnnotation;
-
- if( !`optionVar -exists polyPlaneCutDirection` ||
- (5 == `optionVar -q polyPlaneCutDirection` ) ) {
- $cutFacesLabel = "Cut Faces Tool";
- $cutFacesOptions = "Cut Faces Tool Options";
- $cutFacesAnnotation = "Cut Faces Tool: Cut the faces using a plane";
- } else {
- $cutFacesLabel = "Cut Faces";
- $cutFacesOptions = "Cut Faces Options";
- $cutFacesAnnotation = "Cut Faces: Cut the faces using a plane";
- }
-
- menuItem
- -label $cutFacesLabel
- -annotation $cutFacesAnnotation
- -image "polyCut.xpm"
- -command "CutPolygon"
- -dragDoubleClickCommand "CutPolygonOptions"
- EditPolygonCutPolygonItem;
-
- menuItem -optionBox true
- -annotation $cutFacesOptions
- -image "polyCut.xpm"
- -command "CutPolygonOptions"
- EditPolygonCutPolygonOptionsItem;
-
- menuItem
- -label "Poke Faces"
- -annotation (getRunTimeCommandAnnotation("PokePolygon"))
- -image "polyPoke.xpm"
- -command "PokePolygon"
- -dragDoubleClickCommand "PokePolygonOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("PokePolygonOptions"))
- -image "polyPoke.xpm"
- -command "PokePolygonOptions"
- ;
-
- menuItem
- -label "Wedge Faces"
- -annotation (getRunTimeCommandAnnotation("WedgePolygon"))
- -image "polyWedgeFace.xpm"
- -command "WedgePolygon"
- -dragDoubleClickCommand "WedgePolygonOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("WedgePolygonOptions"))
- -image "polyWedgeFace.xpm"
- -command "WedgePolygonOptions"
- ;
-
- //////////////////////////////////////////////////////////////////////
- menuItem -divider true;
-
- menuItem
- -label "Merge Vertices"
- -annotation (getRunTimeCommandAnnotation("MergeVertices"))
- -image "polyMergeVertex.xpm"
- -command "MergeVertices"
- -dragMenuCommand "performPolyMergeVertex 2"
- -dragDoubleClickCommand "MergeVerticesOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("MergeVerticesOptions"))
- -image "polyMergeVertex.xpm"
- -command "MergeVerticesOptions"
- ;
-
- menuItem
- -label "Merge Multiple Edges"
- -annotation (getRunTimeCommandAnnotation("MergeMultipleEdges"))
- -image "polySewEdge.xpm"
- -command "MergeMultipleEdges"
- -dragMenuCommand "performPolySewEdge 2"
- -dragDoubleClickCommand "MergeMultipleEdgesOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("MergeMultipleEdgesOptions"))
- -image "polySewEdge.xpm"
- -command "MergeMultipleEdgesOptions"
- ;
-
- menuItem
- -label "Merge Edge Tool"
- -annotation (getRunTimeCommandAnnotation("MergeEdgeTool"))
- -image "polyMergeEdge.xpm"
- -command "MergeEdgeTool"
- -dragDoubleClickCommand "MergeEdgeToolOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("MergeEdgeToolOptions"))
- -image "polyMergeEdge.xpm"
- -command "MergeEdgeToolOptions"
- ;
-
- menuItem
- -label "Split Vertex"
- -annotation (getRunTimeCommandAnnotation("SplitVertex"))
- -image "polySplitVertex.xpm"
- -command "SplitVertex"
- ;
-
- //////////////////////////////////////////////////////////////////////
- menuItem -divider true;
-
- // Flip Triangle Edge
- menuItem
- -label "Flip Triangle Edge"
- -annotation (getRunTimeCommandAnnotation("FlipTriangleEdge"))
- -image "polyFlipEdge.xpm"
- -command "FlipTriangleEdge"
- ;
-
- menuItem
- -label "Collapse"
- -annotation (getRunTimeCommandAnnotation("PolygonCollapse"))
- -image "polyCollapseEdge.xpm"
- -command "PolygonCollapse"
- -dragMenuCommand "performPolyCollapse 1"
- ;
-
- menuItem
- -label "Delete Vertex"
- -annotation (getRunTimeCommandAnnotation("DeleteVertex"))
- -image "polyDelVertex.xpm"
- -command "DeleteVertex"
- ;
-
- menuItem
- -label "Delete Edge"
- -annotation (getRunTimeCommandAnnotation("DeleteEdge"))
- -image "polyDelEdge.xpm"
- -command "DeleteEdge"
- ;
-
- //////////////////////////////////////////////////////////////////////
- menuItem -divider true;
-
- menuItem
- -label "Duplicate Face"
- -annotation (getRunTimeCommandAnnotation("DuplicateFace"))
- -image "polyDuplicateFacet.xpm"
- -command "DuplicateFace"
- -dragMenuCommand "performPolyChipOff 2 1"
- -dragDoubleClickCommand "DuplicateFaceOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("DuplicateFaceOptions"))
- -image "polyDuplicateFacet.xpm"
- -command "DuplicateFaceOptions"
- ;
-
- menuItem
- -label "Extract"
- -annotation (getRunTimeCommandAnnotation("ExtractFace"))
- -image "polyChipOff.xpm"
- -command "ExtractFace"
- -dragMenuCommand "performPolyChipOff 2 0"
- -dragDoubleClickCommand "ExtractFaceOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("ExtractFaceOptions"))
- -image "polyChipOff.xpm"
- -command "ExtractFaceOptions"
- ;
-
- menuItem
- -label "Separate"
- -annotation (getRunTimeCommandAnnotation("SeparatePolygon"))
- -image "polySeparate.xpm"
- -command "SeparatePolygon"
- ;
-
- //////////////////////////////////////////////////////////////////////
- menuItem -divider true;
-
- menuItem
- -label "Make Hole Tool"
- -annotation (getRunTimeCommandAnnotation("MakeHoleTool"))
- -image "polyMergeFacet.xpm"
- -command "MakeHoleTool"
- -dragDoubleClickCommand "MakeHoleToolOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("MakeHoleToolOptions"))
- -image "polyMergeFacet.xpm"
- -command "MakeHoleToolOptions"
- ;
-
- menuItem
- -label "Fill Hole"
- -annotation (getRunTimeCommandAnnotation("FillHole"))
- -image "polyCloseBorder.xpm"
- -command "FillHole"
- ;
-
- //////////////////////////////////////////////////////////////////////
-
- // Artisn: Sculpt Polygons Tool.
- menuItem -divider true;
-
- menuItem
- -label "Sculpt Polygons Tool"
- -annotation (getRunTimeCommandAnnotation("SculptPolygonsTool"))
- -image "puttyPoly.xpm"
- -command "SculptPolygonsTool"
- -dragDoubleClickCommand "SculptPolygonsToolOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("SculptPolygonsToolOptions"))
- -image "puttyPoly.xpm"
- -command "SculptPolygonsToolOptions"
- ;
-
- //////////////////////////////////////////////////////////////////////
- menuItem -divider true;
-
- // Clipboard submenu
- string $clipboardItem = `menuItem -label "Clipboard Actions"
- -subMenu true -tearOff true
- -allowOptionBoxes true`;
- PolyClipboardMenu $clipboardItem;
- setParent -menu ..;
-
- // Selection submenu
- string $selectItem = `menuItem -label "Selection"
- -subMenu true -tearOff true
- -allowOptionBoxes true`;
- PolySelectMenu $selectItem;
- setParent -menu ..;
-
- menuItem -divider true;
-
- // Color
- string $colorsItem = `menuItem -label "Colors"
- -subMenu true -tearOff true
- -allowOptionBoxes true
- -postMenuCommand ("refreshPolyColorsMenu \""+$parent+"\"")`;
- PolyColorsMenu $colorsItem;
- setParent -menu ..;
-
- // Normals
- string $normalsItem = `menuItem -label "Normals"
- -subMenu true -tearOff true
- -allowOptionBoxes true`;
- PolyNormalsMenu $normalsItem;
- setParent -menu ..;
-
- //////////////////////////////////////////////////////////////////////
- menuItem -divider true;
-
- // Move component
- menuItem
- -label "Move Component"
- -annotation (getRunTimeCommandAnnotation("MovePolygonComponent"))
- -image "polyMoveVertex.xpm"
- -command "MovePolygonComponent"
- -dragMenuCommand "performPolyMove \"\" 2"
- -dragDoubleClickCommand "MovePolygonComponentOptions"
- ;
-
- menuItem -optionBox true
- -annotation (getRunTimeCommandAnnotation("MovePolygonComponentOptions"))
- -image "polyMoveVertex.xpm"
- -command "MovePolygonComponentOptions"
- ;
-
- // Set options
- menuItem -edit -checkBox `optionVar -query polyCreateShaderWithMapping`
- toggleCreateShaderItem;
- }
- }
-
-